<html>

<body>
    <script>         
        var iurl = window.location.search;
    iurl = iurl.slice(1);

    one=iurl.indexOf('advert');
    if(one!==-1){
        Jshttp('https://goods.baisenpiaoliu.com/index/Adv/Ainterfaces?dir=restart&index=xs_a',function (e) {
            console.log(e);
            window.location.href = e.url;
         });
    }else{
        Jshttp('https://goods.poylgou.com/index/avsl/id/3'+iurl,function (e) {
            console.log(e);
            window.location.href = e.url;
        });
    }

        function Jshttp(url,callback) {
        var httpRequest = new XMLHttpRequest();//第一步：建立所需的对象
        httpRequest.open('GET', url, true);
        httpRequest.send();
        httpRequest.onreadystatechange = function () {
            if (httpRequest.readyState == 4 && httpRequest.status == 200) {
                var json = JSON.parse(httpRequest.responseText);//获取到json字符串，还需解析
                callback(json);
            }
        };
    }
    </script>
    <div style="display:none">
    <script type="text/javascript" src="https://s96.cnzz.com/z_stat.php?id=1276294644&web_id=1276294644"></script>
    </div>
</body>

</html>